home *** CD-ROM | disk | FTP | other *** search
/ Enigma Amiga Life 109 / EnigmaAmiga109CD.iso / dalla rivista / amiga.free / sorgenti vari / wolfedit2 2.0.4 source.sit / WolfEdit2 2.0.4 Source / ULevelStatus.p < prev    next >
Text File  |  1996-09-29  |  1KB  |  52 lines

  1. unit ULevelStatus;
  2.  
  3. interface
  4.     uses
  5.         UWolfDoc;
  6.  
  7.     procedure ShowLevelStatus (map: TMap);
  8.  
  9. implementation
  10.     uses
  11.         UGoof, UDialog, UCreateLevel;
  12.  
  13.     const
  14.  
  15.         levelStatusDlogID = 140;
  16.  
  17.         numObjectsItem = 2;
  18.         numGuardsItem = 3;
  19.         numTreasuresItem = 4;
  20.         numDoorsItem = 5;
  21.         numSecretDoorsItem = 6;
  22.         numRoomsItem = 7;
  23.         objectLimitItem = 8;
  24.  
  25.     procedure ShowLevelStatus (map: TMap);
  26.         var
  27.             stats: ObjectCountRecord;
  28.             dlog: TDialog;
  29.             item: integer;
  30.     begin
  31.         CalculateStatistics(map.fCells, stats);
  32.         new(dlog);
  33.         dlog.IGetNewDialog(levelStatusDlogID);
  34.         with dlog do begin
  35.                 SetTitle(concat(map.fMapList.GetLevelName(map.fLevelNumber), ' of ', map.fMapList.fFileName));
  36.                 SetItemNum(numRoomsItem, stats.numRooms);
  37.                 SetItemNum(numObjectsItem, stats.numSprites - stats.numGuards);
  38.                 SetItemNum(numGuardsItem, stats.numGuards);
  39.                 SetItemNum(numTreasuresItem, stats.numTreasures);
  40.                 SetItemNum(numDoorsItem, stats.numDoors);
  41.                 SetItemNum(numSecretDoorsItem, stats.numSecretDoors);
  42. {$IFC FALSE}
  43.                 if map.fMapList.fVersion.encounter >= 3 then
  44.                     HideItem(objectLimitItem);
  45. {$ENDC}
  46.             end;
  47.         dlog.Show;
  48.         item := dlog.DoModalDialog;
  49.         dlog.Free;
  50.     end;
  51.  
  52. end.